* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

section {
    min-height: 100vh;
    background: linear-gradient(to right, #00b4d8, #caf0f8);
    display: flex;
    justify-content: center;
    align-items: center;
}

.card {
    width: 750px;
    height: 471px;
    background: #fff;
    box-shadow: 2px 10px 20px rgba(0, 0, 0, 0.3);
    position: relative;
}

.card > div {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
}


.card span {
    width: 150px;
    height: 100%;
    transition: 0.75s;
    background-repeat: no-repeat;
    background-size: cover;
    transition-delay: calc(var(--i) * 0.2s);
    background-position-x: calc(var(--i) * -150px);
}

.card div:nth-child(1) span {
    background-image: url(img/1.jpg);
    transform-origin: top;
}

.card div:nth-child(2) span {
    background-image: url(img/2.jpg);
    transform-origin: bottom;
    transform: rotateX(90deg) translateY(50%);
}


.card:hover div:nth-child(1) span {
    transform: rotateX(90deg) translateY(-50%);
}

.card:hover div:nth-child(2) span {
    transform: rotateX(0) translateY(0);
}
